Skip to main content

Morphological Gradient

Emphasizes the boundaries of objects in a binary or grayscale image by calculating the difference between the dilation and erosion of the image.

Check options and parameters of morphologicalGradient method

caution

This method works only with images.

The morphological gradient is a mathematical operation used in image processing and mathematical morphology to highlight the boundaries of objects or regions within an image. It is a fundamental concept in morphological image analysis and is often used for tasks such as edge detection and image segmentation. The morphological gradient is based on the difference between an image after dilation and the same image after erosion.

placeholderplaceholder
Ran in 0.00μs (Infinity ops/s)

Parameters and default values

  • options

Options

PropertyRequiredDefault value
iterationsno1
kernelno[[1, 1, 1],[1, 1, 1],[1, 1, 1]]